I started writing 500 Cards as a programming exercise during one of the holidays I summered over at the University of Otago. Having now left Dunedin I've "completed" it as a way of replacing my (psuedo)flatmates - who could never be relied on to finish a game (or look at beta software it seems;-). It's a fairly standard implementation of four handed Five Hundred; you have a computer partner and the first side to score 500 wins (or -500 looses).
Getting Started.
Double click on the App and a new game will start automagically; volia - there's your card table, your hand (the row of ten cards displayed at the bottom of the window) and three other players! (your partner has the top card position).
Bidding.
It's really simple - just click on any card of the suit you'd like to bid, the computer will ensure you bid the minimum legal number of tricks. If you want to bid higher just click on the same (or any other) suit. Clicking on the Joker is just like clicking on the "No Trumps" button. When you're happy with your bid click on the "Bid" button.
Note that if you have no picture cards there is a redeal button instead of the grayed-out bid button - picking a suit will cause the bid button to appear. The computer players can also opted for redeals, but you probably won't notice them doing it.
Discarding.
So you've won the bidding - now you get to see the kitty and swap about cards to your hearts content. How? Simple, just click on a card in your hand that you want to discard and then click on a card in the kitty that you'd like in your hand. Or you could do it the other way around! The button which finishes discarding should be obvious.
Playing.
Just as per standard 500! Whose standard? I haven't decided yet so I'm not going to be too specific. The only real hard and fast rule is that if possible all players must follow suit (in No Trumps the joker is of no particular suit - hence you could end up being forced to play it last!). Tabled cards can't be taken back.
After each trick there is a slight pause so that you can see what every one else has played - if the pause is too long just click!
You can start a new game at any time, though a warning dialog will appear if a game is in progress. A similar warning appears when you quit or close the window.
And that's it!!!!!!
So just who am I playing?
Well, the "algorithm" the computer players use is a long and confused set of empirical rules I've developed by reflecting on how I play 500 - hopefully I have covered all the obvious things! All three computer players use exactly the same routines and (excluding bugs) they don't cheat (needless to say - they don't play brilliantly at the moment either! ;-). And yes, I count looking at the kitty as cheating.
But, where do the computer player names come from?
OK, The built in names are: my beta testers (Deborah(workmate) & Lincoln(my brother)), my wife Lynne (who has let me spend soooo much time on this that I actually finished!), my parents (Jennifer & Allan), my very old cardbuddies from senior highschool (Craig & Chris - eventually no-one would play against our parterships), my sister (Fiona), our family cat (Scooby) and myself; Denis.
Latest Features (newest -> oldest):
• Added a "Redeal" button to the bidding section - it only appears if you have no picture cards and haven't bid!
• Revamped computer bidding - two different averaged criteria have to be passed before the computer will bid (can still be a bit changeable and just plain stupid).
• Can now start a new game (automatically aborting the old!)
• FIXED Obscure "4 of No Trumps" bug - beeping during a Computer Player picking their card indicates my last defence code is trying to stop this bug (Doh!).
• Program now automatically senses the number of player names available (must be at least four (or it beeps)). DON'T HAVE LESS THAN FOUR - CAN YOU SAY "ENDLESS LOOP"?
• Colour!!! This turned out to be easier than I thought - it's pretty simple stuff; just Black, White, Red, Green and a little bit of Blue. The best colour modes are 4bit and up - gray scale and 2bit colour don't do much for me! B/W works well and is the quickest.
Things to be done soon :
•Write a better ReadMe! How do you format these things?
•Add a dialog to get the (Human) Player's name.
(Currently its either "You" or the first word of the Mac's Owner
Name (which is set via the Sharing Setup control panel))
•Probably add a preference file (to store the player name).
•Smarten up the computer players.
– As a co-worker has pointed out the computer players tend to
over bid at the end game.
•Any (good) ideas suggested.
Things to be done later:
•Some sort of HighScore table.
(maybe two tables:- "Best Winners" and "Worst Losers"?). Ideas?
(the fewer hands played and the more points won the better?)
•Smarten up the computer players (again).
•Any (interesting) ideas suggested.
STILL Reading?
This program was originally written in MacPascal on a Mac Plus. The modern version was written on a Classic and then a Colour Classic using ThinkC 5.0.4 (after converting the Pascal using CTools). The move to a real, event-driven Application was made possible by the purchase of that most excellent Mac D-I-Y programming book :- Macintosh_Programming_Secrets (2nd Ed), written by Scott Knaster and Keith Rollin (who's been really helpful over the Net whenever I've contacted(pestered) him(Thanks)). Also of assistance were; NIM:OV, NIM:MTE, lurking on COMP.SYS.MAC.PROGRAMMING and the Inside_Mac da.
For a while at least I should be reachable on the InterNet via the address "D.Birnie@Regy.Canterbury.ac.NZ"
Den, 25/4/94
PS - If you don't happen to have a very scenic hometown then consider this software to be Some- Place- I've- Lived- Thats- Nicer- Than- The- Hole- I- Was- Born- In- PostCard- Ware!!!